<!DOCTYPE html>
<html>
    <head>
        <!--[if !IE]>
            <me//ta http-equiv="X-UA-Compatible" content="chr//ome=1">
            <me//ta http-equiv="X-UA-Compatible" content="IE=Emu//lateIE7" />
        <![endif]-->
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Chrome Frame 测试页</title>
    </head>
    <body>
        <iframe width="750" height="500" src="http://acid3.acidtests.org/"></iframe>
        <script>
            // 判断是否已安装 Chrome Frame
            var hasChromeFrame = (function() {
                var result;
                return function() {
                    if (typeof result != 'undefined') return result;

                    result = false;
                    if (window.ActiveXObject) {
                        try {
                            if (new ActiveXObject('ChromeTab.ChromeFrame')) result = true;
                        } catch(e) {
                            // squelch
                        }
                    }

                    return result;
                }
            })();

            if (hasChromeFrame()) {
                if (confirm('Chrome Frame has installed, use it?')) {
                    location.replace('cf:'+ location.href);
                }
            }
        </script>
    </body>
</html>
